<?php
require_once(dirname(__FILE__)."/ArrayToObject.class.php");

final class Cookie extends ArrayToObject {
    static private $singleton = null;
    static private $singletonIsset = false;

    public function __construct()
    {
        if(!self::$singletonIsset){
            self::$singletonIsset = true;
            self::$singleton = $this;
            self::$singleton->items = $_COOKIE;
            $_COOKIE =null;
            unset($_COOKIE);
        }
    }
}
